import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Backstage from '@/components/Backstage'
import Users from '@/components/Users'
import Roles from '@/components/Roles'
import Rights from '@/components/Rights'
import Reports from '@/components/Reports'
import Params from '@/components/Params'
import Orders from '@/components/Orders'
import Goods from '@/components/Goods'
import AddGoods from '@/components/AddGoods'
import Categories from '@/components/Categories'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/backstage',
      name: 'Backstage',
      component: Backstage,
      children: [
        {
          path: 'users',
          name: 'Users',
          component: Users
        },
        {
          path: 'roles',
          name: 'Roles',
          component: Roles
        },
        {
          path: 'rights',
          name: 'Rights',
          component: Rights
        },
        {
          path: 'reports',
          name: 'Reports',
          component: Reports
        },
        {
          path: 'params',
          name: 'Params',
          component: Params
        },
        {
          path: 'orders',
          name: 'Orders',
          component: Orders
        },
        {
          path: 'goods',
          name: 'Goods',
          component: Goods,
        },
        {
          path: 'addgoods',
          name: 'addgoods',
          component: AddGoods
        },
        {
          path: 'categories',
          name: 'Categories',
          component: Categories
        }
      ]
    }
  ]
})
